package com.yy.utils;

import java.io.Serializable;
import java.net.URLEncoder;


/**
 * 接口URL实体类
 */
public class URLs implements Serializable {
	public final static String HOST = "";//港付通API
	public final static String HTTP = "http://";
	public final static String HTTPS = "https://";
	
	
	private final static String URL_SPLITTER = "/";
	private final static String URL_UNDERLINE = "_";
	
	public final static String URL_API_HEAD="/WebApi";
	private final static String URL_API_HOST = HTTP + HOST+URL_API_HEAD + URL_SPLITTER;
	private final static String URL_API_HOST_HTTPS = HTTPS + HOST+URL_API_HEAD + URL_SPLITTER;
	
	/*APP升级版本定义*/
	public final static String UPDATE_VERSION = URL_API_HOST+"MobileAppVersion.xml";
	
	/*详细接口地址*/
	public final static String API_REGIST = URL_API_HOST + "api/Authorize/Regist";//注册

	/**
	 * 对URL进行格式处理
	 * @param path
	 * @return
	 */
	@SuppressWarnings("deprecation")
	private final static String formatURL(String path) {
		if(path.startsWith("http://") || path.startsWith("https://"))
			return path;
		return "http://" + URLEncoder.encode(path);
	}	
}
